{if $GLOBALS['TS_URL']['app']=='home' ||  $GLOBALS['TS_URL']['app']=='duty'}

<div id="addpost" class="modal fade">
    <div class="modal-dialog" >
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h5 class="modal-title">评论</h5>
            </div>
            <form id="reply_form" class="form-horizontal">
                <div class="panel-body">
                    <div class="form-group">
                        <div class="col-md-12">
                            <textarea class="form-control" id="content" name="content" rows="6"  placeholder='说点儿什么呗'  ></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-12">
                            <input type="hidden" name="dutyid" id="dutyid" value="">
                            <input type="hidden" name="app" value="duty" />
                            <input type="hidden" name="ac" value="show" />

                            <button type="submit" class="btn btn-primary">提交</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<style type="text/css">
    .notice img{width:100%;height: auto}
</style>
<div id="notice" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"   style="overflow:scroll;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h5 class="modal-title" style="font-weight: bold;font-size: large">{$show_notice['title']}</h5>
                <small style="padding-top: 20px">这是一条你很可能需要了解的消息，阅读完毕，点击底部的“我知道了”，它就不再出现</small>
            </div>
            <div class="modal-body" >

                <div class="form-group">
                    <div>
                        <div class="notice">

                    {$show_notice['content']}
                            </div>
                        </div>
                </div>

                <div class="form-group">
                    <center><a class="btn btn-success btn-block" onclick="close_notice({$show_notice['noticeid']})" >我知道了</a></center>
                </div>

            </div>
        </div>
    </div>
</div>
{/if}
<div id="notice_coach" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"   style="overflow:scroll;">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h5 class="modal-title" style="font-weight: bold;font-size: large">你已经获得担任教练的资格</h5>
                <small style="padding-top: 20px">如果你同意担任教练，那么你的个人主页会显示教练标识；新馆员可设置你为教练，你在社区预约值班时，ta会收到通知，方便ta与你预约同时值班，以获得你的指导。</small>
            </div>
            <div class="modal-body" >

                <div class="form-group">
                    <center><a class="btn btn-success btn-block" onclick="tsPost('index.php?app=user&ac=do&ts=setcoach&js=1',{'type':'1'})" >同意</a></center>
                </div>

                <div class="form-group">
                    <center><a class="btn btn-success btn-block" onclick="tsPost('index.php?app=user&ac=do&ts=setcoach&js=1',{'type':'-1'})" >拒绝</a></center>
                </div>

            </div>
        </div>
    </div>
</div>

<script>

    function MM_jumpMenu(targ,selObj,restore){ //v3.0
        eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
        if (restore) selObj.selectedIndex=0;
    }

    //跳转到服务详情
    function redirect(dutyid){
        window.location.href=siteUrl+'index.php?app=duty&ac=show&dutyid='+dutyid;
    }

    //添加评论
    function add_comment(dutyid){
        $('#dutyid').val(dutyid);
        $('#addpost').modal('show');
    }

    $(function(){
        $('#reply_form').on('submit', function(e) {
            var dutyid = $('#dutyid').val();
            var content = $('#content').val();

            if (content == '<p><br></p>'||content == '') {
                bootbox.alert('内容不能为空');
                return false;
            }

            $.ajax({
                url: "{SITE_URL}index.php?app=duty&ac=addcomment",
                type: 'POST',
                dataType: 'json',
                data: {dutyid:dutyid,content:content},
                success :function(result) {
                    window.location.reload();
                }
            });

        });
    });


    function close_notice(noticeid){
        $.ajax({
            type: "POST",
            url: siteUrl+"index.php?app=user&ac=do&ts=isee",
            data: "noticeid="+noticeid,
            beforeSend:function(){
            },
            success:function(result){
                $('#notice').modal('hide');
            }
        });


    }


</script>

<script>
    $(function () {
        for(i=0;i<=40;i++){
        $("#tips"+i).popover();
       }
    });


</script>

{if $draft=='1'}
<script>
    setTimeout(function () {
        // ue.execCommand('drafts');
        var html = filterXSS(getEditorDraft());
        if (!html) return
        editor.txt.html(html) 
    }, 500);
</script>
{/if}



<div class="container">
{php doAction('pub_footer_top')}

<!--底部公共广告位开始-->
{php doAction('gobad','pub_footer')}
<!--底部公共广告位结束-->
</div>

<div class="footer">
<p>
<a href="{tsUrl('home','info',array('key'=>'about'))}">关于我们</a> |
<a href="{tsUrl('home','info',array('key'=>'contact'))}">联系我们</a> |
<a href="{tsUrl('home','info',array('key'=>'agreement'))}">用户条款</a> |
    {if $GLOBALS['TS_SITE']['link_url']=='http://www.thinksaas.cn/'}
<a href="{tsUrl('home','info',array('key'=>'disclaimer'))}">免责声明</a> |
    {/if}
<a href="{tsUrl('home','info',array('key'=>'job'))}">加入我们</a>
</p>
<p class="fs12">  <a target="_blank" href="{SITE_URL}">{$GLOBALS['TS_SITE'][site_title]}</a> {$GLOBALS['TS_SITE']['site_icp']}</p><p><span style="font-size:0.83em;">Processed in {$GLOBALS['TS_CF']['runTime']} second(s)</span></p>
</div>
<script>
    var siteUid={php echo intval($GLOBALS['TS_USER']['userid'])}; //网站用户ID
</script>
{if intval($GLOBALS['TS_USER']['userid'])}
<script src="{SITE_URL}public/js/imbox/imbox.js" type="text/javascript"></script>
<script>
evdata(siteUid);
</script>

<!--
{if ($TS_APP['appname']=='首页')&&(intval($GLOBALS['TS_USER']['follow_uid'])==0)}
<script>
    url1="{tsUrl('group','topic',array('id'=>51))}";
    url2=siteUrl + "index.php?app=user&ac=follow&ts=de";
    token="{$_SESSION['token']}";
    bootbox.alert('<div><div class="form-group"><div class="col-md-12"><center>友情提示</center></div></div><div class="form-group"></div><div class="form-group"><div class="col-sm-offset-1 col-sm-10">记不记得，谁介绍你来微澜的，包括你看了谁的朋友圈转发才知道微澜的，把ta设置成你的先导吧，你的到来也是ta对微澜的贡献，我们想知道ta是谁。<br>设置完先导，或者点一下“我没有先导”，这个讨厌的窗口就不会再跳出来啦！</div></div> <div class="form-group"></div>   <div class="form-group"><div class="col-sm-offset-1 col-sm-3"><a class="btn btn-success btn-sm"  href='+url1+'> 去设置先导</a></div><div class="col-sm-4">&nbsp;</div><div class="col-sm-4"><a class="btn btn-success btn-sm"  href='+url2+'> 我没有先导</a></div></div></div>');
</script>
{/if}
-->
{/if}
<script src="{SITE_URL}public/js/common.js" type="text/javascript"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" type="text/javascript"></script>
{if is_file('app/'.$GLOBALS['TS_URL']['app'].'/js/extend.func.js')}
<script src="{SITE_URL}app/{$GLOBALS['TS_URL']['app']}/js/extend.func.js" type="text/javascript"></script>
{/if}
{php doAction('pub_footer')}
</body>
</html>

{if $GLOBALS['TS_SITE']['isgzip']==1}{php ob_end_flush();}{/if}

<style>
    .divcss5{
        width:15%;
        display:-moz-inline-box; /* css注释：for ff2 */
        display:inline-block;
    }
</style>

<!--
<div class="navbar navbar-default  navbar-fixed-bottom"  role="navigation">
    <div style="text-align: center;padding: 10px;background-color: #49a5de;color: snow"  >
        <span class="divcss5" ><a href="http://park.xingongmin.org.cn/index.php?app=plan" style="color:snow"> 方案</a></span>
     <span class="divcss5" ><a href="https://shimo.im/docs/0b5e862740514f23" style="color:snow"> 指南</a></span>
        <span class="divcss5"><a href="http://park.xingongmin.org.cn/index.php?app=duty&register=1" style="color:snow">登记</a></span>
        <span class="divcss5"><a href="http://park.xingongmin.org.cn/index.php?app=duty&ac=order" style="color:snow">预约</a></span>
        <span class="divcss5"><a href="http://park.xingongmin.org.cn/index.php?app=user&ac=apply" style="color:snow">申请</a></span>
     <span class="divcss5"><a href="{tsUrl('duty','card',array('userid'=>$GLOBALS['TS_USER']['userid']))}" style="color:snow"> 打卡</a></span>

    </div>
</div>
-->

<script  src="{SITE_URL}public/font_img/iconfont.js"></script>
<style type="text/css">
    .icon1 {
        width: 1em; height: 1em;
        vertical-align: -0.15em;
        fill: currentColor;
        overflow: hidden;
    }
</style>
<script>

    //获取字符串中的图片
    function getimg(str){
        var imgReg = /<img.*?(?:>|\/>)/gi;
         arr = str.match(imgReg);  // arr 为包含所有img标签的数组
        return arr;
    }

    function jump(url){

        window.location.href=url;
    }


    function displayit(n){

        for(i=0;i<5;i++){

            if(i==n){

                var id='menu_list'+n;

                if(document.getElementById(id).style.display=='none'){

                    document.getElementById(id).style.display='';

                    document.getElementById("plug-wrap").style.display='';

                }else{

                    document.getElementById(id).style.display='none';

                    document.getElementById("plug-wrap").style.display='none';

                }

            }else{

                if($('#menu_list'+i)){

                    $('#menu_list'+i).css('display','none');

                }

            }

        }

    }

    function closeall(){

        var count = document.getElementById("top_menu").getElementsByTagName("ul").length;

        for(i=0;i<count;i++){

            document.getElementById("top_menu").getElementsByTagName("ul").item(i).style.display='none';

        }

        document.getElementById("plug-wrap").style.display='none';

    }



    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {

        WeixinJSBridge.call('hideToolbar');

    });

</script>

<style type="text/css">

    body { margin-bottom:60px !important; }


    ul, li { list-style:none; margin:0; padding:0 }

    .top_bar { position: fixed; z-index: 900; bottom: 0; left: 0; right: 0; margin: auto; font-family: Helvetica, Tahoma, Arial, Microsoft YaHei, sans-serif; }

    .top_menu { display:-webkit-box; border-top: 1px solid #49a5de; display: block; width: 100%; background: #49a5de; height: 40px; display: -webkit-box; display: box; margin-top:0; padding-top:0; -webkit-box-orient: horizontal;  }

    .top_bar .top_menu>li { -webkit-box-flex:1; background:  #49a5de, -webkit-gradient(linear, 0 0, 0 100%, from(rgba(255, 255, 255, 0.1)), color-stop(50%, rgba(255, 255, 255, 0.3)), to(rgba(255, 255, 255, 0.1))); -webkit-background-size: 1px 100%, 1px 100%; background-size: 1px 100%, 1px 100%; background-position: 1px center, 2px center; background-repeat: no-repeat; position:relative; text-align:center; width:33%; font-size: 15px; }

    .top_bar .top_menu>li.add { -webkit-box-flex:1; background:  #49a5de; -webkit-background-size: 1px 100%, 1px 100%; background-size: 1px 100%, 1px 100%; background-position: 1px center, 2px center; background-repeat: no-repeat; position:relative; text-align:center; width:25% }

    .top_bar .top_menu>li>a { line-height:40px; display:block; text-align:center; color:snow; text-decoration:none; text-shadow: 0 1px rgba(255, 255, 255, 0.3); -webkit-box-flex:1; }

    .top_menu>li:first-child { background:none; }

    .top_bar .top_menu li a label { padding:0; font-size:12px; overflow:hidden; }

    .top_bar .top_menu>li>a img { display: inline-block; height: 14px; width: 14px; margin-top:-2px; color: #fff; line-height: 40px; vertical-align:middle; }

    .top_bar li:first-child a { display: block; }

    /*此处改过：width: 86%; margin-left: 7%;*/
    .menu_font { padding: 0; position: absolute; z-index: 500; bottom: 60px; width: 86%; margin-left: 7%; background: #000000;  border: 1px solid #000000;  }

    /*.menu_font:before, .menu_font:after { content:""; display:inline-block; position:absolute; z-index:240; bottom:0; left: 80%; margin-left:-8px; margin-bottom:-16px; width:0; height:0; border:0px solid red; border-color:#afaeaf transparent transparent transparent; }*/

    .menu_font:after { z-index:501;  margin-bottom:-15px; margin-left:-8px; }

    .menu_font.hidden { display:none; }

    .top_menu li:last-of-type a { background: none; }

    .top_menu>li:last-of-type>a label { padding: 0 0 0 3px; }

    .menu_font li:last-of-type { background: none; }

    .menu_font li { line-height:40px; text-align:center; background:#000000; background-size:100% 1px, 100% 2px; background-repeat:no-repeat; background-position: center bottom; }

    .menu_font li:first-of-type { border-top: 0; }

    .menu_font li:last-of-type { border-bottom: 0; }

    .menu_font li a { height: 40px; line-height: 40px !important; position: relative; color: white;font-weight: 100; font-size: x-small; display: block; width: 100%; text-align:center; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;  text-decoration: none; }

    /*让最后一个菜单的格式跟其他一样，此处被注释了*/
    /*#menu_list0 { right:0; left:10px; }*/
    /*#menu_list0:before, #menu_list0:after { left: 20%; }*/

    #sharemcover { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); display: none; z-index: 20000; }

    #sharemcover img { position: fixed; right: 18px; top: 5px; width: 260px; height: 180px; z-index: 20001; border:0; }

    .top_bar .top_menu>li>a:hover, .top_bar .top_menu>li>a:active { background-color: #555555 ; }

    .menu_font li a:hover, .menu_font li a:active { background-color:#555555; }

    .menu_font li:first-of-type a { border-radius:5px 5px 0 0; }

    .menu_font li:last-of-type a { border-radius:0 0 5px 5px; }

    #plug-wrap { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0); z-index:800; }

    #cate18 .device {bottom: 49px;}

    #cate18 #indicator {bottom: 240px;}

    #cate19 .device {bottom: 49px;}

    #cate19 #indicator {bottom: 330px;}

    #cate19 .pagination {bottom: 60px;}

</style>

<div id="sharemcover" onclick="document.getElementById(&#39;sharemcover&#39;).style.display=&#39;&#39;;" style=" display:none"><img src="./style13_files/MgnnofmleM.png"></div>

<div class="top_bar" style="-webkit-transform:translate3d(0,0,0)">

    <nav>

        <ul id="top_menu" class="top_menu">


            <li>
                <a onclick="javascript:displayit(1)">栏目</a>
                <ul id="menu_list1" class="menu_font" style=" display:none">
                    <li><a href="{tsUrl('group','index')}"><label>小组</label></a></li>
                    <li><a href="{tsUrl('event','index')}"><label>活动</label></a></li>
                    <li><a href="{tsUrl('article','index')}"><label>文档</label></a></li>
                    <li><a href="{tsUrl('duty','index')}"><label>服务</label></a></li>
                    <li><a href="{tsUrl('task','index')}"><label>任务</label></a></li>
                    <li><a href="{tsUrl('gift','index')}"><label>微铺</label></a></li>
                    <li><a href="{tsUrl('wish','index')}"><label>心愿</label></a></li>
                    <li><a href="{tsUrl('user','index')}"><label>成员</label></a></li>
                    <li><a href="{tsUrl('history','index')}"><label>时间轴</label></a></li>
                </ul>
            </li>
            <li>
                <a onclick="javascript:displayit(2)">资料</a>
                <ul id="menu_list2" class="menu_font" style=" display:none">
                    <li><a href="{tsUrl('duty','sum')}"><label>工时统计</label></a></li>
                    <li><a href="{tsUrl('duty','chart')}"><label>各馆排班</label></a></li>
                    <li><a href="{tsUrl('group','index',array('all'=>1))}"><label>各馆一览</label></a></li>
                    <li><a href="https://d.dituzhe.com/ShareMap/6B04FB"><label>各馆地图</label></a></li>
                    {if $GLOBALS['TS_USER']['isadmin']=='1'}
                    <li><a href="{tsUrl('group','contact')}"><label>收货地址</label></a></li>
                    <li><a href="{tsUrl('group','stock')}"><label>打捞馆东</label></a></li>
                    <li><a href="{tsUrl('group','vo')}"><label>打捞馆员</label></a></li>
                    {/if}
                    <li><a href="{tsUrl('user','list')}"><label>成员名单</label></a></li>
                    <li><a href="{tsUrl('group','show',array('id'=>6))}"><label>规章制度</label></a></li>
                    <li><a href="https://shimo.im/docs/0b5e862740514f23"><label>操作指南</label></a></li>
                    <li><a href="{tsUrl('plan','index')}"><label>活动方案</label></a></li>

                </ul>
            </li>
            <!--
            {if !$TS_USER['isvo']}
                <li>
                    <a href="https://mv.lingxi360.com/m/u1co9e">报名</a>
                </li>
            {/if}
                {if $TS_USER['isstock']!=1}
                <li><a href="{tsUrl('group','index')}">捐赠</a></li>
                {/if}
                -->
            <li>

                <a onclick="javascript:displayit(3)">操作</a>
                <ul id="menu_list3" class="menu_font" style=" display:none">
                    <li><a href="{tsUrl('duty','index',array('register'=>1))}"><label>服务登记</label></a></li>
                    <li><a href="{tsUrl('duty','order')}"><label>预约值班</label></a></li>
                    <li><a href="{tsUrl('user','apply')}"><label>申报证章</label></a></li>
                    <li><a href="{tsUrl('wish','add')}"><label>发布心愿</label></a></li>
                    <li><a href="{tsUrl('gift','add')}"><label>发布商品</label></a></li>
                    <li><a href="{tsUrl('article','add')}"><label>发布文档</label></a></li>
                    <li><a href="{tsUrl('event','add')}"><label>发布活动</label></a></li>
                    <li><a href="https://mp.weixin.qq.com/s/8Jko7qyzixaycHQQbr-m5Q"><label>发起微聚</label></a></li>
                    <li><a href="{tsUrl('group','topic',array('id'=>488))}"><label>空间改造</label></a></li>
                </ul>
            </li>

            <li>
                <a onclick="javascript:displayit(4)">报名</a>
                <ul id="menu_list4" class="menu_font" style=" display:none">
                    <li><a href="{tsUrl('group','index',array('type'=>1,'all'=>1))}"><label>各馆馆东</label></a></li>
                    <li><a href="{tsUrl('group','index',array('type'=>2,'all'=>1))}"><label>分馆馆员</label></a></li>
                    <li><a href="{tsUrl('group','index',array('type'=>3,'all'=>3))}"><label>总馆馆员</label></a></li>
                </ul>
            </li>

            {if $TS_USER}
            <li id="remind">
                <a onclick="javascript:displayit(0)">我</a>
                <ul id="menu_list0" class="menu_font" style=" display:none">
                    <li><a href="{tsUrl('user','article',array('id'=> $_SESSION['tsuser']['userid']))}#info"><label>文档</label></a></li>
                    <li><a href="{tsUrl('user','space',array('id'=> $_SESSION['tsuser']['userid']))}#info"><label>小组</label></a></li>
                    <li><a href="{tsUrl('user','duty',array('id'=> $_SESSION['tsuser']['userid']))}"><label>档案</label></a></li>
                    <li><a href="{tsUrl('my','setting',array('ts'=>'base'))}"><label>设置</label></a></li>
                    <li><a href="{tsUrl('message','my')}" id="newmsg1"><label>消息</label></a></li>
                    <li><a href="{tsUrl('user','cardlist')}"><label>贺卡</label></a></li>
                </ul>
            </li>
            {/if}
        </ul>
    </nav>

</div>

<div id="plug-wrap" onclick="closeall()" style="display: none;"></div>

{if $show_notice}
<script>

    $('#notice').modal('show');

</script>

{/if}

{if $count_duty>9}
<script>

    $('#notice_coach').modal('show');

</script>

{/if}

<style type="text/css">
    .mask {
        position: absolute; top: 0px; filter: alpha(opacity=60); background-color: #777;
        z-index: 1002; left: 0px;
        opacity:0.5; -moz-opacity:0.5;
        background-image:url("{SITE_URL}public/images/loading.gif") ;
        background-repeat: no-repeat;
        background-attachment:fixed;
        background-position:center;
    }
</style>


<div id="mask" class="mask" onclick="hideMask()"></div>
